"use strict";
cc._RF.push(module, '9b43cGcjO9MYInWokp5/o/q', 'CarEffectBlast');
// scripts/CarEffectBlast.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _i,
    n = void 0 && (void 0).__extends || (_i = function i(t, e) {
  return (_i = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    a = void 0 && (void 0).__decorate || function (t, e, o, i) {
  var n,
      a = arguments.length,
      r = a < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);else for (var s = t.length - 1; s >= 0; s--) {
    (n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
  }
  return a > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = t("GameConstant"),
    s = t("BroadCastMessage"),
    l = cc._decorator,
    c = l.ccclass,
    d = l.property,
    h = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.sp_blast = null, e._gameControl = null, e;
  }

  return n(e, t), e.prototype.onLoad = function () {
    this.node.active = !1;
  }, e.prototype.init = function (t) {
    this._gameControl = t, this._gameControl.node.addChild(this.node, r.Scene_Z_Index.Car_Blast);
  }, e.prototype.onGameBoutReady = function () {
    this.node.active = !1;
  }, e.prototype.onGameBoutStart = function () {}, e.prototype.playEffect = function (t) {
    var e = this;
    this.node.active = !0, this.sp_blast.node.active = !0;
    var o = null;
    t == r.Car_Site.Left ? (o = this._gameControl._carLeftView.getCarWorldPos(), this.sp_blast.setAnimation(0, "huangche_baozha", !1)) : t == r.Car_Site.Right && (o = this._gameControl._carRightView.getCarWorldPos(), this.sp_blast.setAnimation(0, "lanche_baozha", !1));
    var i = this.node.parent.convertToNodeSpaceAR(o);
    this.node.position = cc.v3(i.x, i.y, 0), this.node.zIndex = r.Scene_Z_Index.Car_Blast, s["default"].getInstance().SendMessage(r.Game_Broadcast_Func.Audio, r.Game_Audio_ID.car_boom), this.scheduleOnce(function () {
      e.sp_blast.node.active = !1, e.node.active = !1;
    }, 1.25);
  }, a([d(sp.Skeleton)], e.prototype, "sp_blast", void 0), a([c], e);
}(cc.Component);

o["default"] = h;

cc._RF.pop();